package cn.itsource.ymcc.web.controller;


import cn.itsource.ymcc.result.JSONResult;
import cn.itsource.ymcc.service.VerifycodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/verifycode")
public class VerifycodeController {

    @Autowired
    private VerifycodeService verifycodeService;

    @RequestMapping("/sendSmsCode/{phone}")
    public JSONResult sendSmsCode(@PathVariable("phone") String phone){

        verifycodeService.sendSmsCode(phone);
        //发送短信验证码
        return JSONResult.success();
    }

}
